﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace AdminSystem.Doamins
{
    /// <summary>
    /// 商品表
    /// </summary>
    /// 
    [Table("Product")]
    public class Product
    {
       
        [Key]
        [Display(Name = "自增标识")]
        public int ProductId { get; set; }
        [Required]
        [Display(Name = "商品名称")]
        [Column(TypeName = "nvarchar(50)")]
        public string ProductCode {  get; set; }

        [Required]
        [Display(Name = "生产批次")]
        [Column(TypeName = "nvarchar(50)")]
        public string ProductBatch { get; set; }

        [Required]
        [Display(Name = "保质期（天）")]
       
        public int ShelfLife { get; set; }

        [Required]
        [Display(Name = "生产许可证号")]
        [Column(TypeName = "nvarchar(50)")]
        public string LicenseNumber { get; set; }

        [Required]
        [Display(Name = "生产企业")]
        [Column(TypeName = "nvarchar(50)")]
        public string Enterprise { get; set; }

        [Required]
        [Display(Name = "创建人")]
        [Column(TypeName = "nvarchar(50)")]
        public string Creator { get; set; }

        [Required]
        [Display(Name = "创建时间")]
        [Column(TypeName = "nvarchar(50)")]
        public DateTime CreateTime { get; set; }

        [Required]
        [Display(Name = "修改人")]
        [Column(TypeName = "nvarchar(50)")]
        public string Updator { get; set; }

        [Required]
        [Display(Name = "修改时间")]
        [Column(TypeName = "nvarchar(50)")]
        public DateTime UpdateTime { get; set; }

        [Required]
        [Display(Name = "删除人")]
        [Column(TypeName = "nvarchar(50)")]
        public string Deletor { get; set; }

        [Required]
        [Display(Name = "删除人")]
        [Column(TypeName = "nvarchar(50)")]
        public DateTime DeleteTime { get; set; }

        [Required]
        [Display(Name = "封面图片")]
        [Column(TypeName = "nvarchar(300)")]
        public string Url { get; set; }
    }
}
